import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  addrList: '/user/address',
  addrAll: '/index/address',
}

/**
 * 列表记录
 */
export function addrList (params) {
  return axios({
    url: api.addrList,
    method: 'get',
    params
  })
}
export function addrAll (params) {
  return axios({
    url: api.addrAll,
    method: 'get',
    params
  })
}
/**
 * 详情记录
 */
export function detail (params) {
  return axios({
    url: api.detail,
    method: 'get',
    params
  })
}


/**
 * 修改会员等级
 * @param {*} data
 */
export function grade (data) {
  return axios({
    url: api.grade,
    method: 'post',
    data
  })
}

/**
 * 删除记录
 * @param {*} data
 */
export function deleted (data) {
  return axios({
    url: api.delete,
    method: 'post',
    data: data
  })
}
